package org.itstack.demo.design.domain.service.engine;

import org.itstack.demo.design.domain.service.logic.LogicFilter;
import org.itstack.demo.design.domain.service.logic.impl.UserAgeFilter;
import org.itstack.demo.design.domain.service.logic.impl.UserGenderFilter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author: fanYuLe
 * @CreateTime: 2023-12-20  09:44
 * @Description: 决策配置
 */
public class EngineConfig {
    static Map<String, LogicFilter> logicFilterMap;

    static {
        logicFilterMap = new ConcurrentHashMap<>();
        logicFilterMap.put("userAge",new UserAgeFilter());
        logicFilterMap.put("userGender",new UserGenderFilter());
    }

    public Map<String,LogicFilter> getLogicFilterMap(){
        return logicFilterMap;
    }

    public void setLogicFilterMap(Map<String, LogicFilter> logicFilterMap){
        EngineConfig.logicFilterMap = logicFilterMap;
    }
}
